package ac.kr.pusan.dj.han.dic.model;

import java.sql.Connection;
import java.sql.DriverManager;
import java.sql.SQLException;

public class DBConnection {
	public static Connection getCon() { //Connection 클래스 접속 이기때문에 리턴값이 Connection
		Connection con=null;
		try{
			Class.forName("oracle.jdbc.driver.OracleDriver"); //드라이버 로딩
			String url="jdbc:oracle:thin:@localhost:1521:XE"; //오라클 접속
			con=DriverManager.getConnection(url, "scott", "tiger"); //로그인
		}catch(SQLException se){
			System.out.println(se.getMessage());
		}catch(ClassNotFoundException cf){
			System.out.println(cf.getMessage());
		}
		return con;
	}
}
